package Jackson.home.com.testeJDBC
;

import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import javax.naming.spi.DirStateFactory.Result;

public class Conexao {
	
	private static Connection con;
	public static Connection getConexao() throws SQLException{
		
		String url = "jdbc:oracle:thin:@localhost:1521:xe";
		
		return con = DriverManager.getConnection(url,"system","025896");
		
/*		String sql = "select * from medico";
		PreparedStatement stm = con.prepareStatement(sql);
		ResultSet rs = stm.executeQuery()
			while(rs.next()){
				System.out.println(rs.getString("nome_medico"));
			}
			con.close();
			stm.close();
			rs.close();
		}catch (SQLException e) {
			System.out.println("Exception SQL"+e);
		}*/
		
	}
}
